#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	int n = 0;
	scanf("%d", &n);
	int i = 0;
	int sn = 0;
	int a = n;
	for (i = 1; i < 6;i++)
	{
		sn += n;
		n = (n * 10) + a;
	}
	printf("%d",sn);
	return 0;
}